import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:wayofdressing/screens/init_screen.dart';

class SettingScreen extends StatelessWidget {
  const SettingScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Color(0xfffffaf0),
      child: IconButton(
        onPressed: () async{
          SharedPreferences prefs = await SharedPreferences.getInstance();
          await prefs.clear();
          Navigator.of(context).pushAndRemoveUntil(
            MaterialPageRoute(builder: (context) => InitScreen()),
            (Route<dynamic> route) => false,
          );
        },
        icon: Icon(Icons.arrow_back_ios_new_rounded),
      ),
    );
  }
}
